home *** CD-ROM | disk | FTP | other *** search
/ Hacks & Cracks / Hacks_and_Cracks.iso / cracking software / pgp cracker.zip / usuals.h < prev   
C/C++ Source or Header  |  1996-04-27  |  5KB  |  137 lines

  1. /* usuals.h - The usual typedefs, etc.
  2. */
  3. #ifndef USUALS /* Assures no redefinitions of usual types...*/
  4. #define USUALS
  5.  
  6. typedef unsigned char boolean;    /* values are TRUE or FALSE */
  7. typedef unsigned char byte;    /* values are 0-255 */
  8. typedef byte *byteptr;    /* pointer to byte */
  9. typedef char *string;    /* pointer to ASCII character string */
  10. typedef unsigned short word16;    /* values are 0-65535 */
  11. #ifdef __alpha
  12. typedef unsigned int word32;    /* values are 0-4294967295 */
  13. #else
  14. typedef unsigned long word32;    /* values are 0-4294967295 */
  15. #endif
  16.  
  17. #ifndef TRUE
  18. #define FALSE 0
  19. #define TRUE (!FALSE)
  20. #endif    /* if TRUE not already defined */
  21.  
  22. #ifndef min    /* if min macro not already defined */
  23. #define min(a,b) (((a)<(b)) ? (a) : (b) )
  24. #define max(a,b) (((a)>(b)) ? (a) : (b) )
  25. #endif    /* if min macro not already defined */
  26.  
  27. /* void for use in pointers */
  28. #ifndef NO_VOID_STAR
  29. #define    VOID    void
  30. #else
  31. #define    VOID    char
  32. #endif
  33.  
  34.     /* Zero-fill the byte buffer. */
  35. #define fill0(buffer,count)    memset( buffer, 0, count )
  36.  
  37.     /* This macro is for burning sensitive data.  Many of the
  38.        file I/O routines use it for zapping buffers */
  39. #define burn(x) fill0((VOID *)&(x),sizeof(x))
  40.  
  41. #ifdef C370
  42. #define EBCDIC
  43. #include "c370.h"
  44. #endif /* C370 */
  45.  
  46. #ifdef LE370
  47. #define EBCDIC
  48. #endif /* LE370 */
  49.  
  50. #ifdef EBCDIC
  51.  
  52. #ifndef PSTR
  53. #define PSTR(x) x
  54. #endif
  55. #define PORTABLE
  56. #define HIGHFIRST
  57. #define IDEA32
  58. #define UNIT32
  59. #define USE_NBIO
  60. #define NOTERMIO
  61. #define BEL  '\a'
  62. #define BS   '\b'
  63. #define FF   '\f'
  64. #define LF   '\n'
  65. #define CR   '\r'
  66. #define HT   '\t'
  67. #define VT   '\v'
  68. #define TAB   HT
  69. #define DEL   0x07              /* ASCII 0x7f */
  70. #define ESC   0x27              /* ASCII 0x1b */
  71. #define CtrlZ EOF               /* ASCII 0x1a */
  72.  
  73. #pragma map( mp_shortdiv,          "MPILIB01" )
  74. #pragma map( mp_shortmod,          "MPILIB02" )
  75. #pragma map( mp_modexp,            "MPILIB03" )
  76. #pragma map( mp_modexp_crt,        "MPILIB04" )
  77. #pragma map( cryptRandWriteFile,   "RANDOM00" )
  78. #pragma map( cryptRandOpen,        "RANDOM01" )
  79. #pragma map( cryptRandWash,        "RANDOM02" )
  80. #pragma map( cryptRandByte,        "RANDOM03" )
  81. #pragma map( cryptRandSave,        "RANDOM04" )
  82. #pragma map( cryptRandCreate,      "RANDOM05" )
  83. #pragma map( trueRandEvent,        "RANDOM06" )
  84. #pragma map( trueRandFlush,        "RANDOM07" )
  85. #pragma map( trueRandConsume,      "RANDOM08" )
  86. #pragma map( trueRandAccumLater,   "RANDOM09" )
  87. #pragma map( trueRandAccum,        "RANDOM10" )
  88. #pragma map( trueRandByte,         "RANDOM11" )
  89. #pragma map( version_error,        "CRYPTO01" )
  90. #pragma map( version_byte_error,   "CRYPTO02" )
  91. #pragma map( copyfile,             "FILEIO01" )
  92. #pragma map( copyfilepos,          "FILEIO02" )
  93. #pragma map( copyfile_to_canon,    "FILEIO03" )
  94. #pragma map( copyfile_from_canon,  "FILEIO04" )
  95. #pragma map( copyfiles_by_name,    "FILEIO05" )
  96. #pragma map( savetemp,             "FILEIO06" )
  97. #pragma map( savetempbak,          "FILEIO07" )
  98. #pragma map( extract_from_keyring, "KEYMGM01" )
  99. #pragma map( extract_keyID,        "KEYMGM02" )
  100. #pragma map( getpubuserid,         "KEYMGM03" )
  101. #pragma map( getpubusersig,        "KEYMGM04" )
  102. #pragma map( version_byte,         "PGP00001" )
  103. #pragma map( compress_enabled,     "PGP00002" )
  104. #pragma map( compressSignature,    "PGP00003" )
  105. #pragma map( processConfigLine,    "CONFIG01" )
  106. #pragma map( processConfigFile,    "CONFIG02" )
  107. #pragma map( write_trust,          "KEYMAI01" )
  108. #pragma map( write_trust_pos,      "KEYMAI02" )
  109. #pragma map( rsa_public_encrypt,   "RSAGLU01" )
  110. #pragma map( rsa_public_decrypt,   "RSAGLU02" )
  111. #pragma map( rsa_private_encrypt,  "RSAGLU03" )
  112. #pragma map( rsa_private_decrypt,  "RSAGLU04" )
  113. #pragma map( fetch_word16,         "MPIIO001" )
  114. #pragma map( fetch_word32,         "MPIIO002" )
  115. #pragma map( put_word16,           "MPIIO003" )
  116. #pragma map( put_word32,           "MPIIO004" )
  117. #pragma map( ideaCfbDestroy,       "IDEA0001" )
  118. #pragma map( ideaCfbDecrypt,       "IDEA0002" )
  119. #pragma map( ideaRandInit,         "IDEA0003" )
  120. #pragma map( ideaRandByte,         "IDEA0004" )
  121. #pragma map( ideaRandWash,         "IDEA0005" )
  122. #pragma map( ideaRandState,        "IDEA0006" )
  123. #pragma map( randPoolStir,         "RANDPO01" )
  124. #pragma map( randPoolAddBytes,     "RANDPO02" )
  125. #pragma map( randPoolGetBytes,     "RANDPO03" )
  126. #pragma map( randPoolGetByte,      "RANDPO04" )
  127. #pragma map( inflate_codes,        "ZINFLA01" )
  128. #pragma map( inflate_stored,       "ZINFLA02" )
  129. #pragma map( inflate_fixed,        "ZINFLA03" )
  130. #pragma map( inflate_dynamic,      "ZINFLA04" )
  131. #pragma map( inflate_block,        "ZINFLA05" )
  132. #pragma map( inflate_entry,        "ZINFLA06" )
  133.  
  134. #endif /* EBCDIC */
  135.  
  136. #endif    /* if USUALS not already defined */
  137.